
if(${ARCH} STREQUAL "arm")
    message("build for arm")
    include_directories(${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_ARM64/usr/local/include
    ${CMAKE_CURRENT_LIST_DIR}/../3rd_party/imageHelper)
    
    set(MNN_DEPS ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_ARM64/usr/local/lib/libMNN.so
    ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_ARM64/usr/local/lib/libMNN_Express.so
    ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_ARM64/usr/local/lib/libMNN_CL.so
    )
    message("MNN_DEPS: ${MNN_DEPS}")
else()
    message("build for x64")
    include_directories(${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_x64/usr/local/include 
    ${CMAKE_CURRENT_LIST_DIR}/../3rd_party/imageHelper)
    
    set(MNN_DEPS ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_x64/usr/local/lib/libMNN.so
    ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_x64/usr/local/lib/libMNN_Express.so
    ${CMAKE_CURRENT_LIST_DIR}/../lib/libMNN_x64/usr/local/lib/libMNN_CL.so
    )
    
    message("MNN_DEPS: ${MNN_DEPS}")
endif()

add_executable(pictureRecognition.out ${CMAKE_CURRENT_LIST_DIR}/pictureRecognition.cpp)
target_link_libraries(pictureRecognition.out ${MNN_DEPS})

add_executable(pictureRotate.out ${CMAKE_CURRENT_LIST_DIR}/pictureRotate.cpp)
target_link_libraries(pictureRotate.out ${MNN_DEPS})

add_executable(multiPose.out ${CMAKE_CURRENT_LIST_DIR}/multiPose.cpp)
message("asa${CMAKE_DL_LIBS}")
target_link_libraries(multiPose.out ${MNN_DEPS} ${CMAKE_DL_LIBS})

add_executable(segment.out ${CMAKE_CURRENT_LIST_DIR}/segment.cpp)
target_link_libraries(segment.out ${MNN_DEPS})

add_executable(expressDemo.out ${CMAKE_CURRENT_LIST_DIR}/expressDemo.cpp)
target_link_libraries(expressDemo.out ${MNN_DEPS})

add_executable(transformerDemo.out ${CMAKE_CURRENT_LIST_DIR}/transformerDemo.cpp)
target_link_libraries(transformerDemo.out ${MNN_DEPS})

add_executable(logistic.out ${CMAKE_CURRENT_LIST_DIR}/logistic.cpp)
target_link_libraries(logistic.out ${MNN_DEPS})

# add following lines
add_executable(yolo.out yolov3.cpp)
target_link_libraries(yolo.out ${MNN_DEPS})

find_package(OpenCV REQUIRED)
target_link_libraries(yolo.out ${OpenCV_LIBS} )

#add_executable(rasterDemo.out ${CMAKE_CURRENT_LIST_DIR}/rasterDemo.cpp)
#target_link_libraries(rasterDemo.out ${MNN_DEPS})
